package com.scsj.cloud.hdata.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.scsj.cloud.hdata.service.Crawler;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @C 爬取特定网页图片
 * @author caoxiubin
 *
 */
@RestController
@RequestMapping("/scsj/crawler/picture")
@Api(value = "图片爬取相关")
public class CrawlerController {
	
	@Autowired
	private Crawler crawler;
	
 
    @PostMapping("/getPicByUrl")
    @ApiOperation(value = "爬取特定网页图片", notes = "参数：网页url")
    public void mkdir(@RequestParam("url") String url) throws Exception {
    	this.crawler.crawling(url);
    }
    
    
}
